﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BUIANHQUAN.OOP.STUDENT
{
    public partial class VIEWS : Form
    {
        public VIEWS()
        {
            InitializeComponent();
        }

        private void VIEWS_Load(object sender, EventArgs e)
        {
            STUDENTS objSV01;
            STUDENTS objSV02;
            STUDENTS objSV03;
            STUDENTS objSV04;
            objSV01 = new STUDENTS(123456789, "abc@gmail.com", "Hoàng Văn Thanh");
            objSV02 = new STUDENTS(123456789, "abc@gmail.com", "Phạm Thị Thùy Linh");
            objSV03 = new STUDENTS(123456789, "abc@gmail.com", "Trần Văn Hiếu");
            objSV04 = new STUDENTS(123456789, "abc@gmail.com", "Nguyễn Văn Hùng");
            listBox1.Items.Add("Mã SV: SV01");
            listBox1.Items.Add("Phone: " + objSV01.Phone);
            listBox1.Items.Add("Email: " + objSV01.Email);
            listBox1.Items.Add("Name: " + objSV01.Name);

            listBox1.Items.Add("Mã SV: SV01");
            listBox1.Items.Add("Phone: " + objSV02.Phone);
            listBox1.Items.Add("Email: " + objSV02.Email);
            listBox1.Items.Add("Name: " + objSV02.Name);

            listBox1.Items.Add("Mã SV: SV01");
            listBox1.Items.Add("Phone: " + objSV03.Phone);
            listBox1.Items.Add("Email: " + objSV03.Email);
            listBox1.Items.Add("Name: " + objSV03.Name);

            listBox1.Items.Add("Mã SV: SV01");
            listBox1.Items.Add("Phone: " + objSV04.Phone);
            listBox1.Items.Add("Email: " + objSV04.Email);
            listBox1.Items.Add("Name: " + objSV04.Name);

            objSV01._Email = "thanhhv@gmail.com";
            objSV01._Phone = 0988123456;
            objSV02._Phone = 0988123457;
            objSV02._Email = "linhptt@gmail.com";
            objSV03._Email = "hieutv@gmail.com";
            objSV03._Phone = 0988123458;
            objSV04._Phone = 0988123459;
            objSV04._Email = "hungnv@gmail.com";
            listBox1.Items.Add("-----------------Đã cập nhật--------------");
            listBox1.Items.Add("Mã SV: SV01");
            listBox1.Items.Add("Phone: " + objSV01._Phone);
            listBox1.Items.Add("Email: " + objSV01._Email);
            listBox1.Items.Add("Name: " + objSV01.Name);

            listBox1.Items.Add("Mã SV: SV01");
            listBox1.Items.Add("Phone: " + objSV02._Phone);
            listBox1.Items.Add("Email: " + objSV02._Email);
            listBox1.Items.Add("Name: " + objSV02.Name);

            listBox1.Items.Add("Mã SV: SV01");
            listBox1.Items.Add("Phone: " + objSV03._Phone);
            listBox1.Items.Add("Email: " + objSV03._Email);
            listBox1.Items.Add("Name: " + objSV03.Name);

            listBox1.Items.Add("Mã SV: SV01");
            listBox1.Items.Add("Phone: " + objSV04._Phone);
            listBox1.Items.Add("Email: " + objSV04._Email);
            listBox1.Items.Add("Name: " + objSV04.Name);
        }
    }
}
